// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_pr.p_activity;

import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;
import com.nnee.p_fk.cls_ActivityEx;
import com.nnee.p_fk.cls_k;
import com.nnee.p_img.cls_d;
import com.nnee.p_l.p_a.cls_a;
import com.nnee.p_pr.p_a.cls_h;
import com.nnee.p_pr.p_activity.p_view.cls_PRISActivityTitleTextView;
import com.nnee.p_pr.p_activity.p_view.cls_PRISActivityUserIcon;
import com.nnee.p_pr.p_atom.p_u.cls_UserInfo;
import com.nnee.p_pr.cls_b;
import com.nnee.p_pr.cls_v;

// Referenced classes of package com.nnee.p_pr.p_activity:
//            dv, dy, dw, PRISActivitySetting, 
//            PRISActivityUserInfoModify, du, dx

public class cls_PRISActivityUserInfo extends cls_ActivityEx
{

    public cls_PRISActivityUserInfo()
    {
        q = 1;
        b = new cls_dv(this);
    }

    static Bitmap a(cls_PRISActivityUserInfo prisactivityuserinfo, Bitmap bitmap)
    {
        prisactivityuserinfo.i = bitmap;
        return bitmap;
    }

    private void a(int i1, Intent intent)
    {
        if(i1 == -1)
        {
            if(intent != null)
            {
                i = (Bitmap)intent.getParcelableExtra("data");
                cls_UserInfo userinfo = (cls_UserInfo)intent.getParcelableExtra("extra_userinfo_value");
                g();
                a(userinfo);
            } else
            {
                cls_v.a().e(g);
            }
        } else
        if(i1 != 0);
    }

    public static void a(Context context, String s)
    {
        if(TextUtils.isEmpty(s))
        {
            com.nnee.p_pr.p_a.cls_h.a(context, 0x7f0a013a);
        } else
        {
            Intent intent = new Intent(context, com.nnee.p_pr.p_activity.cls_PRISActivityUserInfo.class);
            intent.putExtra("extra_userinfo_name", s);
            intent.putExtra("mode", 1);
            context.startActivity(intent);
        }
    }

    static void a(cls_PRISActivityUserInfo prisactivityuserinfo)
    {
        prisactivityuserinfo.e();
    }

    static void a(cls_PRISActivityUserInfo prisactivityuserinfo, cls_UserInfo userinfo)
    {
        prisactivityuserinfo.a(userinfo);
    }

    private void a(cls_UserInfo userinfo)
    {
    	 String as[];
         android.widget.LinearLayout.LayoutParams layoutparams1;
         int i1;
         TextView textview1;
         StringBuilder stringbuilder;
         
        if(userinfo != null) {
        	h = userinfo;
            String s = userinfo.x();
            if(!TextUtils.isEmpty(s))
                d.a(s);
            else
                d.a("");
            if(userinfo.d())
                d.b(com.nnee.p_l.p_a.cls_a.b(this, userinfo.g()));
            if(userinfo.e())
            {
                String s1 = userinfo.w();
               
                if(i != null)
                    d.a(i);
                else
                    d.setId(com.nnee.p_fk.cls_k.a(this).a(0x7f02012c));
                stringbuilder = new StringBuilder();
                com.nnee.p_img.cls_d.a().a(stringbuilder, 1, s1, new cls_dy(this, stringbuilder), 48, 48, 1);
            }
            if(userinfo.c())
            {
                as = userinfo.v();
                layoutparams1 = new android.widget.LinearLayout.LayoutParams(-1, -2);
                if(as != null)
                    for(i1 = 0; i1 < as.length; i1++)
                    {
                        textview1 = (TextView)getLayoutInflater().inflate(0x7f030023, null);
                        textview1.setText(as[i1]);
                        textview1.setTextColor(Color.rgb(102, 102, 102));
                        textview1.setLayoutParams(layoutparams1);
                        f.a(textview1);
                    }

            }
            if(userinfo.b())
            {
                android.widget.LinearLayout.LayoutParams layoutparams = new android.widget.LinearLayout.LayoutParams(-1, -2);
                TextView textview = (TextView)getLayoutInflater().inflate(0x7f030023, null);
                textview.setText(userinfo.f());
                textview.setLayoutParams(layoutparams);
                textview.setTextColor(Color.rgb(102, 102, 102));
                e.a(textview);
            }
        }
 
    }

    private void a(String s)
    {
        if(TextUtils.isEmpty(s))
            com.nnee.p_pr.p_a.cls_h.a(this, 0x7f0a0137);
        else
        	cls_v.a().e(s);
    }

    private void b()
    {
        setTitle(0x7f0a0136);
        if(q == 2)
        {
            g(8);
        } else
        {
            f(0x7f020136);
            findViewById(0x7f0d0008).setOnClickListener(new cls_dw(this));
        }
        g = getIntent().getStringExtra("extra_userinfo_name");
        a(g);
        j = findViewById(0x7f0d0118);
        k = findViewById(0x7f0d011a);
        j.setBackgroundDrawable(com.nnee.p_fk.cls_k.a(this).b(0x7f0200d9));
        k.setBackgroundDrawable(com.nnee.p_fk.cls_k.a(this).b(0x7f0200d9));
        d = (cls_PRISActivityUserIcon)findViewById(0x7f0d0117);
        e = (cls_PRISActivityTitleTextView)findViewById(0x7f0d0119);
        e.a(0x7f0a00f3);
        f = (cls_PRISActivityTitleTextView)findViewById(0x7f0d011b);
        f.a(0x7f0a00f4);
    }

    public static void b(Context context, String s)
    {
        if(TextUtils.isEmpty(s))
        {
            com.nnee.p_pr.p_a.cls_h.a(context, 0x7f0a013a);
        } else
        {
            Intent intent = new Intent(context, com.nnee.p_pr.p_activity.cls_PRISActivityUserInfo.class);
            intent.putExtra("extra_userinfo_name", s);
            intent.putExtra("mode", 2);
            context.startActivity(intent);
        }
    }

    static void b(cls_PRISActivityUserInfo prisactivityuserinfo)
    {
        prisactivityuserinfo.c();
    }

    private void c()
    {
        com.nnee.p_b.p_a.cls_d.h().k();
        com.nnee.p_pr.p_activity.cls_PRISActivitySetting.b(this);
        finish();
    }

    static void c(cls_PRISActivityUserInfo prisactivityuserinfo)
    {
        prisactivityuserinfo.g();
    }

    static Bitmap d(cls_PRISActivityUserInfo prisactivityuserinfo)
    {
        return prisactivityuserinfo.i;
    }

    static cls_PRISActivityUserIcon e(cls_PRISActivityUserInfo prisactivityuserinfo)
    {
        return prisactivityuserinfo.d;
    }

    private void e()
    {
        com.nnee.p_pr.p_activity.cls_PRISActivityUserInfoModify.a(this, 1, h, i);
    }

    private void f()
    {
        showDialog(1);
    }

    private void g()
    {
        e.a();
        f.a();
    }

    protected void onActivityResult(int i1, int j1, Intent intent)
    {
      switch(  i1){
    	  case 1:
    		  a(j1, intent);
    		  break;
    		  default:
    			  super.onActivityResult(i1, j1, intent);
    			  break;
      }
      
    }

    protected void onCreate(Bundle bundle)
    {
        super.onCreate(bundle);
        setContentView(0x7f03004c);
        cls_v.a().a(b);
        if(getIntent() != null)
            q = getIntent().getIntExtra("mode", 1);
        b();
    }

    protected Dialog onCreateDialog(int i1)
    { Object obj  ;
       switch( i1)
       {
       case 1:
    	   android.app.AlertDialog.Builder builder = (new android.app.AlertDialog.Builder(this)).setIcon(0x7f020087).setTitle(0x7f0a0102);
           Object aobj[] = new Object[1];
           aobj[0] = com.nnee.p_b.p_a.cls_d.h().c();
           obj = builder.setMessage(getString(0x7f0a0103, aobj)).setPositiveButton(0x7f0a0104, new cls_du(this)).setNegativeButton(0x7f0a0105, new cls_dx(this)).create();

    	   break;
    	   default:
    		   obj = super.onCreateDialog(i1);
    		   break;
    	   
       }
       return ((Dialog) (obj));
   
    }

    public boolean onCreateOptionsMenu(Menu menu)
    {
        boolean flag;
        if(q == 2)
        {
            flag = super.onCreateOptionsMenu(menu);
        } else
        {
            menu.add(0, 1, 0, 0x7f0a0138).setIcon(0x7f020094);
            menu.add(0, 2, 0, 0x7f0a0139).setIcon(0x7f02009a);
            flag = super.onCreateOptionsMenu(menu);
        }
        return flag;
    }

    protected void onDestroy()
    {
        if(i != null)
        {
            i.recycle();
            i = null;
        }
        cls_v.a().b(b);
        super.onDestroy();
    }

    public boolean onOptionsItemSelected(MenuItem menuitem)
    {
        boolean flag = true;
       switch( menuitem.getItemId()){
       case 1:
    	   e();
    	   break;
       case 2:
    	   f();
    	   break;
       default:
    	   flag = onOptionsItemSelected(menuitem);
    	   break;
       }
       
        return flag;
 
    }

    static final int a = 1;
    private static final String c = "PRISActivityUserInfo";
    private static final String l = "mode";
    private static final int m = 1;
    private static final int n = 2;
    private static final int o = 1;
    private static final int p = 2;
    cls_b b;
    private cls_PRISActivityUserIcon d;
    private cls_PRISActivityTitleTextView e;
    private cls_PRISActivityTitleTextView f;
    private String g;
    private cls_UserInfo h;
    private Bitmap i;
    private View j;
    private View k;
    private int q;
}
